home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 45
/
Amiga Format CD45 (1999-09)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-11].iso
/
-serious-
/
misc
/
mcread
/
original
/
mcreadme
< prev
next >
Wrap
Text File
|
1999-08-09
|
6KB
|
120 lines
mcread 1.0
(C)1991 by Mike Gleason Jr... NCEMRSoft, Baby!
Purpose
The primary goal of mcread is to decode binary MacWrite(tm) files and display
the readable text on other platforms. A secondary goal is to display plain
text and TeachText files originally created on a Macintosh.
mcread can deal with both MacBinary files (usually those ending with .bin) and
raw files, but it prefers MacBinary files, because it can then tell exactly
what type of file it's up against, and if it can decode it. As a small
example, let's say that you want to get some files off of FTP, and download
them to your mac. Usually those files are ascii files in the BinHex 4.0
standard. So you get mcvert* and decode the BinHex (.hqx) file into a smaller
MacBinary file (.bin). Further, let's assume the decoded file was a Stuffit
archive, so it will have the suffix ".sit.bin." You could go ahead and
download the compressed file to your mac, but why waste your own valuable CPU
time :-) You also decode the Stuffit(tm) archive using unsit**, and it will
produce a whole nasty of mess of files ending in .data, .info, .rsrc. Next
you need to convert these files into MacBinary files, and to do that you use
macbin.* Finally, you have decoded all the files on your remote machine. But
why stop there? You can go ahead and read the documentation on the remote
machine, instead of having to launch you favorite megamemoryhogmocious word
processor just to read a 2K "README." This is where mcread comes in. You
simply type "mcread README.bin" and bingo, you peruse the README instantly.
In fact, if you are looking at the file "mcREADME," then you are looking at an
example of mcread's work, which was done by "mcread MACAtest.bin > mcREADME"
on a un*x machine.
*mcvert, unsit, and macbin should be in the same directory as mcread was when
you download it. If not, you can get them via FTP to sumex-aim.stanford.edu
(IP address is 36.44.0.6), in the /info-mac/unix directory.
**someone really should work on unsit so it produces MacBinary files in the
first place, and have the option to delete the archive after decoding. mcvert
should delete those damned binhex's when it finishes too... but I digress.
Options
* -pN: puts mcread in paging mode, prompting you every N lines. The default
value for N is 23. A better idea though, would be to pipe the output into a
real pager, like "less."
* -wN: Do you have a pud terminal that only displays 40 characters? Or
maybe you think you're bad because you can display 132 or more characters on a
line. You can make mcread wordwrap to any (reasonable) length, by specifying
-w. The default is 78.
* -tN: Let's mcread know how many spaces a tab should equal. If you don't
specify -t, mcread assumes N = 4.
Additional Features
* If there is a picture embedded in the MacWrite or TeachText file, it let's
you know by sticking in a "### picture omitted" message.
* Since a fair number of Mac files contain extended characters, mcread makes
a modest effort to convert them into printable 7 bit ASCII. As examples, the
bullet character * is replaced by an asterisk, "smart" quotes are lobotomized,
and things like the trademark character get mapped to a string of characters:
(tm). Obviously there are going to be some side effects, like un-English
characters such as the German umlauted characters being stripped of their
umlauts. Had mcread been a half-assed effort, it would have just omitted or
stripped the 8th bit, so consider yourself lucky ;-)
* The tab substitution feature isn't just going to tack on 'N' spaces, it
treats them as tab stops, so things will line up nicely. This would be handy
if you're planning on mcread'ing a whole bunch of Technical Notes with a
buttload o' code in them.
* If you pass -t0 for the tab substitution, it doesn't output any spaces,
instead it goes ahead and puts out the tab character.
* While mcread is not intended to provide an exact replica of the document,
it's not like the Mac DA "QRead" either, where it just barfs characters
(nothing against QRead of course). The output is word-wrapped and has tab
stops, so it should not be an eyestrain to read.
Caveats
* mcread only reads MacWrite 4.5 files. It doesn't read the way older 2.2
format, and I assume it won't read Claris' MacWrite II format. But since 50%
of the documentation distributed with mac software is MW 4.5 format, and the
other 40% plain TEXT format, I don't think it will cause much of a problem.
Future
I hope this isn't the end of mcread. I think at the bare minimum, Microsoft
Word support should be added. MacWrite 2.2 support could be added, if someone
else beats me to it, or if there is an insane amount of registrations. Other
word processors could be added, like WriteNow and FullWrite, and maybe other
things like PageMaker and MS-DOS word processors. I've sort of started
working on mcread so it will take input from stdin, but I haven't seen a
personal need for it so I've suspended it. Other things could be done, like
turning on ANSI codes for bold-faced text and such, I suppose.
ScholarshipWare?
This is Un*x ShareWare. If you use this tool, you can show your gratitude in
one or both of the following ways:
1. Whip out a 1$US bill (or the equivalent foreign currency; I like foreign
coins) and mail it to the address below; It's only a dollar, and it goes
towards a good cause: my tuition!
2. Mail me a short note written on your company stationery saying how useful
this is to you, blah, blah, blah. This is for the scholarship committee here
at the University of Nebraska; If I can hand in a bunch of these letters with
my scholarship form, they'll be impressed, and maybe give me a grant!
Thanks!!!
### picture omitted!
Mike Gleason Jr.
5705 North 117th Plaza
Omaha, NE 68164
U.S.A.